﻿

namespace Mulala.Cavan.Presentation.Seedwork
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Web.Security;
    using Mulala.Cavan.Core;
    using System.Diagnostics.Contracts;
    using Mulala.Cavan.Core.Extension;

    public static class FormAuthenticationService
    {
        public static void SignIn(string userName, bool createPersistentCookie)
        {
            Contract.Requires(!userName.IsNotEmpty(), "userName cannot be null or empty.");
            FormsAuthentication.SetAuthCookie(userName, createPersistentCookie);
        }

        public static void SignOut()
        {
            FormsAuthentication.SignOut();
        }
    }
}
